package org.jeecg.modules.simulator.factory.train.load;
import org.jeecg.modules.simulator.model.MetroTrain;
import org.jeecg.modules.simulator.model.line.plan.TrainPlanTablePath;

import java.util.HashMap;
import java.util.Map;

/**
 * @BelongsProject: demo2
 * @BelongsPackage: com.miaohy.demo.vo.newventity.scene.factory.train
 * @Author: renzhg
 * @CreateTime: 2024-07-30  11:09
 * @Description: TODO
 * @Version: 1.0
 */
public class TrainTableTimeAware {

//    TrainPlanTableLoader trainPlanTableLoader=new TrainPlanTableLoader();
//


    public void Load(){

//列车时刻表
//        trainPlanTableLoader.loadData();
        //线路分配列车数
//        lineTrainLoader.loadData();
        //轨道
//        orbitPathFileDataLoader.loadData();
    }
//一个线路对应多个列车
    Map<String, MetroTrain> metroTrainMap=new HashMap<>();
    Map<String, TrainPlanTablePath> trainPlanTablePathMap=new HashMap<>();
    public Map<String, TrainPlanTablePath> getTrainPlanTablePathMap() {
        return trainPlanTablePathMap;
    }
  /**
   * @description: 装配轨道
   * @author: renzhg
   * @date: 2024/8/8 10:18
   * @param: 
   * @return: 
   * @return: java.util.Map<java.lang.String,org.jeecg.modules.simulator.model.MetroTrain>
   **/
//    public Map<String,MetroTrain> awareOrbitPath(Map<String, Map<String, OrbitPoint>> orbitPaths, Map<String, TrainPhysics>  trainPhysicsMap ){
////        Map<String, Map<String, OrbitPoint>> orbitPaths = orbitPathFileDataLoader.getOrbitPaths();
////        Map<String, MetroTrain> metroTrainMap = createMetroTrain(orbitPaths,trainPhysicsMap);
////        return  Collections.synchronizedMap(metroTrainMap);
//    }

/**
 * @description: 装配时刻表变动作记录表
 * @author: renzhg
 * @date: 2024/8/8 10:21
 * @param:
 * @return:
 * @return: java.util.Map<java.lang.String,org.jeecg.modules.simulator.model.train.action.TrainActionRecorders>
 **/
//    public Map<String, TrainActionRecorders> createTrain(){
//
//        Map<String, TrainPlanTablePath> trainPlanTablePathMap = trainPlanTableLoader.getTrainPlanTablePathMap();
//        Map<String, TrainActionRecorders> trainActionRecorders = TrainActionRDSFactory.createTrainActionRecorders(trainPlanTablePathMap);
//        return trainActionRecorders;
//    }
    
//    public Map<String,MetroTrain> createMetroTrain(Map<String, Map<String, OrbitPoint>> orbitPaths,
//                                                   Map<String, TrainPhysics> trainPhysicsMap,
//                                                   Map<String, List<String>> lineTrainMap
//    ) {
////        Map<String, List<String>> lineTrainMap = lineTrainLoader.getLineTrainMap();
//
//        lineTrainMap.forEach((k, v) -> {
//            for (int i = 0; i < v.size(); i++) {
//                MetroTrain metroTrain = new MetroTrain();
//                String trainid = v.get(i).split("-")[0];
//                String trainNo = v.get(i).split("-")[1];
//                Map<String, OrbitPoint> orbitPointMap = orbitPaths.get(k);
//                //装配轨道
//                TrainBiz trainBiz = new TrainBiz(orbitPointMap);
//                trainBiz.setLastState(TrainRunState.start);
//                metroTrain.setTrainPhysics(trainFileDataLoader.getTrainPhysicsMap().get(trainid));
//                TrainPhysics trainPhysics=new TrainPhysics();
//                trainPhysics=trainPhysicsMap.get("s1");
//                metroTrain.setTrainPhysics(trainPhysics);
//
//                metroTrain.setTrainId(trainid);
//                metroTrain.setTrainNum(trainNo);
//                metroTrain.setTrainBiz(trainBiz);
//
//                metroTrainMap.put(v.get(i), metroTrain);
//            }
////            MetroTrain metroTrain = new MetroTrain();
////            metroTrainMap.put(k, metroTrain);
//        });
//        return metroTrainMap;
//    }



}
